﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Lx.Web.Common.UI;
using System.IO;
using System.Web;
using System.Web.UI;

using Model;
using BLL.WWW_User.Learn;
using Model.WWW_User.LearnComment;

namespace BLF.WWW_WWW.Learn
{
    /// <summary>
    /// Learn 的摘要说明
    /// </summary>
    public class Learn
    {
        /// <summary>
        /// 获取学习语言的所有会员信息（包括小黑板信息）
        /// </summary>
        /// <param name="learnL">学习语言</param>
        /// <param name="baseL">会说语言</param>
        /// <param name="teachLanguage">会教语言</param>
        /// <param name="pageIndex">pageIndex</param>
        /// <param name="pageSize">pageSize</param>
        /// <param name="outList">0:Comment,1:CommentCount,2:user for learn,3:user for speak</param>
        /// <returns>CommonMessage</returns>
        public static CommonMessage GetLearnMembersAndComment(string learnL, string baseL, string teachLanguage, int pageIndex, int pageSize, out ArrayList outList)
        {
            return (new LearnSystem()).GetLearnMembersAndComment(learnL, baseL, teachLanguage, pageIndex, pageSize, out outList);
        }
        /// <summary>
        /// 获取学习语言的所有会员信息（包括小黑板信息）
        /// </summary>
        /// <param name="learn">学习语言</param>
        /// <param name="pageIndex">pageIndex</param>
        /// <param name="pageSize">pageSize</param>
        /// <param name="recordCount">输出记录</param>
        /// <returns>CommentModel列表</returns>
        public static ArrayList GetLearnMembersAndComment(string learnL, int pageIndex, int pageSize)
        {             
            ArrayList arrayList = new ArrayList();
            int recordCount = 0;
            List<Model.WWW_User.LearnComment.LearnCommentModel> mc = (new LearnSystem()).GetLearnMembersAndComment(learnL, pageIndex, pageSize, out recordCount);
            arrayList.Add(new PageableObject(recordCount, pageIndex, pageSize));
            arrayList.Add(mc);
            return arrayList;
        }
        /// <summary>
        /// 获取学习语言的所有会员信息（包括小黑板信息）
        /// </summary>
        /// <param name="learn">学习语言</param>
        /// <param name="pageIndex">pageIndex</param>
        /// <param name="pageSize">pageSize</param>
        /// <param name="recordCount">输出记录</param>
        /// <returns>CommentModel列表</returns>
        public static List<LearnCommentModel> GetLearnMembersAndComment(string learnL, int pageIndex, int pageSize, out int recordCount)
        {            
            return (new LearnSystem()).GetLearnMembersAndComment(learnL, pageIndex, pageSize, out recordCount);
        }

        /// <summary>
        /// 增加学习评论
        /// </summary>
        /// <param name="cm">CommentModel</param>
        /// <returns>CommonMessage</returns>
        public static CommonMessage AddComments(string learn, string content, string memberno)
        {
            return (new LearnSystem()).AddComments(learn, content, memberno);
        }
        ///// <summary>
        ///// 根据语言类型获取所有会员信息
        ///// </summary>
        ///// <param name="learn">学习语言</param> 
        ///// <param name="baseL">会说语言</param>
        ///// <param name="baseLevel">可以教的语言</param>
        ///// <param name="pageIndex">pageIndex</param>
        ///// <param name="pageSize">pageSize</param>        
        ///// <returns>会员列表</returns>
        //public static ArrayList GetMembers(string learnL, string baseL, string teachLanguage, int pageIndex, int pageSize)
        //{
        //    ArrayList arrayList = new ArrayList();
        //    int recordCount = 0;
        //    List<UserSummaryInfoModel> um = (new LearnSystem()).GetMembers(learnL, baseL, teachLanguage, pageIndex, pageSize, out recordCount);
        //    arrayList.Add(new PageableObject(recordCount, pageIndex, pageSize));
        //    arrayList.Add(um);
        //    return arrayList;
        //}
        ///// <summary>
        ///// 根据语言类型获取所有会员信息
        ///// </summary>
        ///// <param name="learn">学习语言</param> 
        ///// <param name="baseL">会说语言</param>
        ///// <param name="baseLevel">可以教的语言</param>
        ///// <param name="pageIndex">pageIndex</param>
        ///// <param name="pageSize">pageSize</param>
        ///// <param name="recordCount">输出记录</param>
        ///// <returns>会员列表</returns>
        //public static List<UserSummaryInfoModel> GetMembers(string learnL, string baseL, string teachLanguage, int pageIndex, int pageSize, out int recordCount)
        //{
        //    return (new LearnSystem()).GetMembers(learnL, baseL, teachLanguage, pageIndex, pageSize, out recordCount);
        //}
    }
}
